<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Title</title>
    <!-- 引入ElementUI样式 -->
    <link rel="stylesheet" href="/css/index.css">
    <script src="/js/vue.js"></script>
    <!-- 引入ElementUI组件库 -->
    <script src="/js/index.js"></script>
    <script src="/js/axios-0.18.0.js"></script>
    <script>
        location.href = "/pages/main.html";
    </script>
</head>
<body>
<!--<div id="app">
    &lt;!&ndash;
rules：表单验证规则
&ndash;&gt;
    <el-form label-width="80px">
        &lt;!&ndash;
            prop：表单域 model 字段，在使用 validate、resetFields 方法的情况下，该属性是必填的
        &ndash;&gt;
        <el-form-item label="用户名" prop="user.username">
            <el-input v-model="user.username"></el-input>
        </el-form-item>
        <el-form-item label="密码" prop="user.password">
            <el-input type="password" v-model="user.password"></el-input>
        </el-form-item>
        <el-form-item>
            <el-button type="primary" @click="onSubmit">登录</el-button>
        </el-form-item>
    </el-form>
    <script>
        new Vue({
            el:'#app',
            data:{
                user:{
                    username:"",
                    password:""
                }
            },
            methods:{
                onSubmit(){
                    let _this = this;
                    axios.post("/user/login.do",_this.user)
                        .then(function (response) {
                            response.data === true ? alert("登录成功！") : alert("登录失败！")
                    },"json");
                }
            }
        });
    </script>
</div>-->
</body>
</html>